<?php
namespace app\admin\controller;
class Website extends Action
{
    public function index()
    {
        if(request()->isPost()){
            $data = input("post.");
            $update = db("website")->where("id",1)->update($data);
            if($update!==false){
               $this->redirect(url('admin/website/index',array('id'=>1)));
            }
        }
        $data = db("website")->where("id",1)->find();
        return $this->fetch('index',["data"=>$data]);
    }
}